<template>
    <div class="container">
      <div class="goalselect">
        <span style="font-size: 20px; color: #415058;">目标：</span>
        <el-select v-model="value" clearable placeholder="Select">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          />
        </el-select>
      </div>
      <div class="timeselect">
        <span style="font-size: 20px; color: #415058;">时间节点：</span>
        <el-date-picker
          v-model="value_time"
          type="daterange"
          start-placeholder="Start date"
          end-placeholder="End date"
          :default-time="defaultTime"
        />
      </div>
    </div>
  </template>
  
  <script lang="ts" setup>
  import { ref } from 'vue';
  
  const value = ref('');
  const options = [
    { value: '大学生英语四级', label: '大学生英语四级' },
    { value: '大学生英语六级', label: '大学生英语六级' },
    { value: '计算机二级', label: '计算机二级' },
    { value: '普通话考试', label: '普通话考试' },
    { value: '雅思', label: '雅思' },
  ];
  const value_time = ref('');
  const defaultTime = ref<[Date, Date]>([
    new Date(2000, 1, 1, 0, 0, 0),
    new Date(2000, 2, 1, 23, 59, 59),
  ]);
  </script>
  
  <style scoped>
  .container {
    position: absolute;
    display: flex;
    align-items: center;
    margin-top: 10px;
    justify-content: center; /* 水平居中 */
  }
  
  .goalselect {
    display: flex;
    align-items: center;
    margin-right: 20px; /* 调整两个选择器之间的间距 */
  }
  
  .timeselect {
    display: flex;
    align-items: center;
  }
  </style>
  